package com.kaiyiweitong.tongxing.fragment.my_order;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridLayout;

import com.kaiyiweitong.tongxing.R;
import com.kaiyiweitong.tongxing.activity.my.MyOrderActivity;
import com.kaiyiweitong.tongxing.adapter.CanceledAdapter;

/**
 * Created by Administrator on 2017/12/21 0021.
 */

public class CanceledFragment extends Fragment {
    private View mView;
    private MyOrderActivity mActivity;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mView = inflater.inflate(R.layout.fragment_my_order, null);
        mActivity = (MyOrderActivity) getActivity();
        init();
        return mView;
    }

    private void init() {
        mView.findViewById(R.id.no_data).setVisibility(View.INVISIBLE);
        RecyclerView rv= (RecyclerView)mView.findViewById(R.id.rv_my_order);
        rv.setLayoutManager(new GridLayoutManager(mActivity, 1, GridLayout.VERTICAL, false));
        CanceledAdapter adapter = new CanceledAdapter(mActivity);
        rv.setAdapter(adapter);
    }
}
